package com.itjeffrey.autocode.controller;

import com.itjeffrey.autocode.common.Result;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 基础通用上传控制器接口
 * MultipartFile 为入参类型，T为反参类型
 *
 * @From: Jeffrey
 * @Date: 2020/11/20
 */
public interface BaseUploadController<MultipartFile, T> {

    /**
     * 通用上传接口
     *
     * @param multipartFile
     * @return
     */
    @PostMapping("/upload")
    ResponseEntity<Result<T>> upload(@RequestParam("file") MultipartFile multipartFile);

}
